<?php
require '../../../zb_system/function/c_system_base.php';
require '../../../zb_system/function/c_system_admin.php';
$zbp->Load();
$action='root';
if (!$zbp->CheckRights($action)) {$zbp->ShowError(6);die();}
if (!$zbp->CheckPlugin('txgonggao')) {$zbp->ShowError(48);die();}

$blogtitle='天兴工作室--右下角网站公告';
require $blogpath . 'zb_system/admin/admin_header.php';
?>
<script src="source/jscolor.js" type="text/javascript"></script>
<style type="text/css">.tb-set td{padding:10px}</style>
<?php
require $blogpath . 'zb_system/admin/admin_top.php';
?>
<div id="divMain">
  <div class="divHeader"><?php echo $blogtitle;?></div>
  <div class="SubMenu">
 	<a href="main.php" ><span class="m-left">设置首页</span></a>
    <a href="http://www.txcstx.cn/" target="_blank"><span class="m-right">帮助</span></a>
  </div>
  <div id="divMain2">
<!--代码-->
    <?php
	if(isset($_POST['bt'])){
        $zbp->Config('txgonggao')->bt = $_POST['bt'];
		$zbp->Config('txgonggao')->nr = $_POST['nr'];
		$zbp->Config('txgonggao')->bk = $_POST['bk'];
		$zbp->Config('txgonggao')->bg = $_POST['bg'];
		$zbp->Config('txgonggao')->kd = $_POST['kd'];
		$zbp->SaveConfig('txgonggao');
		$zbp->SetHint('good');
		Redirect('./main.php');
	}
	?>
	<form action="main.php" method="post">
		<table class="tb-set" width="100%" style='padding:0;margin:0;' cellspacing='0' cellpadding='0'>	
<tr>
    <td width="25%">公告标题</td>
    <td colspan="3"><input type="text" class="txt txt-sho"  style="width:91%;" name="bt" value="<?php echo $zbp->Config('txgonggao')->bt; ?>" /></td>
</tr>	

<tr>
    <td width="25%">公告内容</td>
    <td colspan="3"><textarea name="nr" type="text" id="qqhm" style="width:90%; height:200px;padding:1%;"><?php echo $zbp->Config('txgonggao')->nr; ?></textarea></td>
</tr>		

  <tr>
    <td width="25%">边框颜色</td>
    <td width="25%"><input name="bk" type="text" class="color"  style="width:50%" value="#<?php echo $zbp->Config('txgonggao')->bk;?>" /></input></td>
    <td width="25%">标题背景颜色</td>
    <td width="25%"><input name="bg" type="text" class="color"  style="width:50%" value="#<?php echo $zbp->Config('txgonggao')->bg;?>" /></input>    </td>
  </tr>
  
  <tr>
    <td width="25%">宽度</td>
    <td colspan="3"><input type="text" class="txt txt-sho" name="kd" value="<?php echo $zbp->Config('txgonggao')->kd; ?>" /> px</td>
  </tr>
			<tr>
				<td colspan="4"><input type="submit" name="submit" value="保存" /></td>
			</tr>
		</table>
	</form>

  </div>
</div>
<script type="text/javascript">AddHeaderIcon("<?php echo $bloghost . 'zb_users/plugin/txgonggao/logo.png';?>");</script>
<?php
require $blogpath . 'zb_system/admin/admin_footer.php';
RunTime();
?>